const BASE_URL = "http://192.168.1.100:8083"

export const request = (options) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: BASE_URL + options.url,
			data: options.data || {},
			method: options.method || 'POST',
			dataType: 'json',
			// header: {dataType: 'json'},
			success: res => {
				resolve(res)
			},
			fail: err => {
				reject(err)
			}
		})
	})
}
